package client.construct.singleton.ext;

import uml.construct.singleton.ext.MultiInstance;

import java.util.ArrayList;

/**
 * 多例类--客户端<br>
 * on 2022/12/22 0:14
 */
public class Client {
    public static void main(String[] args) {
        ArrayList<MultiInstance> instances = MultiInstance.getInstances(5);
        ArrayList<MultiInstance> instances1 = MultiInstance.getInstances(10);
        MultiInstance.getInstances(2);
        System.out.println(instances==instances1);
        for (int i = 0; i < instances.size(); i++) {
            System.out.println(instances.get(i)==instances1.get(i));
        }
    }
}
